# -*- coding:utf-8 -*-

import re
import time

start = time.time()

p = re.compile(r'(\b\w+)\s+\1')

for i in range(1,1000000):
    a = p.search('Paris in the the spring').group()
print a

end = time.time()
print  '%02f'  % (end-start)





start2 = time.time()
for i in range(1,1000000):
    b = re.search(r'(\b\w+)\s+\1','Paris in the the spring')

print b
end2 = time.time()

print  '%02f'  % (end2-start2)

# 编译过和没编译过的区别还是很大的
